package com.example.leetdemo.process;

public class Solution1793 {

    public int maximumScore(int[] nums, int k) {
        int l = 0, r = nums.length - 1;
        int[] minL = new int[k - l + 1], minR = new int[r - k + 1];
        minL[k] = nums[k];
        minR[0] = nums[k];
        for (int i = k - 1; i >= 0; i--) {
            minL[i] = Math.min(minL[i + 1], nums[i]);
        }
        for (int i = k + 1; i < nums.length; i++) {
            minR[i - k] = Math.min(minR[i - k - 1], nums[i]);
        }
        int maxLength = 1;
        for (int length = 0; length < nums.length - 1; length ++) {

            for (int i = l, j = r - length; j < nums.length; i++, j++) {
                if (i > k || j < k) {
                    continue;
                }
                int min = minL[i];
            }
        }
        return 0;
    }

    public static void main(String[] args) {
        System.err.println(String.format("0 0 0 0 0 ? */%s", 6));
    }

}
